package com.wlyuan.open.assembler;

import com.wlyuan.basic.dto.consignee.ConsigneeCreationDTO;
import com.wlyuan.basic.dto.consignee.ConsigneeUpdateDTO;
import com.wlyuan.open.basic.dto.OpenConsigneeCreationDTO;
import com.wlyuan.open.basic.dto.OpenConsigneeUpdateDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author
 * 承运商转化
 */
public class ConsigneeAssembler {
    @Mapper(uses = {

    })
    public interface Assembler {

        ConsigneeCreationDTO assemble(OpenConsigneeCreationDTO openConsignee);

        ConsigneeUpdateDTO assemble(OpenConsigneeUpdateDTO openConsignee);

    }

    private static final Assembler ASSEMBLER = Mappers.getMapper(Assembler.class);

    public static ConsigneeCreationDTO assemble(OpenConsigneeCreationDTO openConsignee){
        return ASSEMBLER.assemble(openConsignee);
    }

    public static ConsigneeUpdateDTO assemble(OpenConsigneeUpdateDTO openConsignee){
        return ASSEMBLER.assemble(openConsignee);
    }

}
